/* 
 * File:   program.h
 * Author: abadalya
 *
 * Created on November 28, 2011, 10:47 AM
 */

#ifndef PROGRAM_H
#define	PROGRAM_H

struct expression;
struct symbol_table;

#define PROGRAM_LENGTH 100

/**
 * The program defined as a pair of symbol table and 
 * a list of expressions.
 */
struct program {
    struct symbol_table* global;
    int exprc;
    struct expression** execlist;
};

extern struct program* create_program();
extern void destroy_program(struct program*);
extern void append_expression(struct program*, struct expression*);
extern int execute_program(struct program*);

#endif	/* PROGRAM_H */

